<template>
    <div>
        <p>{{ foo }}</p>
        <button @click="handleClick">event bus</button>
    </div>
</template>

<script>
export default {
    inject: ['foo'],
    created() {
        this.$bus.$emit('event-bus', 123, 345);
    },
    methods: {
        handleClick() {
            this.$bus.$emit('event-bus', 123, 345);
        },
    },
};
</script>

<style lang="scss" scoped></style>
